CICS Example
This example uses the VSE recorder to record a CICS LINK service image.
When the registry is started, it shows that the mainframe bridge has started in client mode and the bridge is connected to the LPAR agent.
This example demonstrates eliminating a resource dependency. In the example, a CICS application requires a VSAM file for input to fields for account balance information, but the VSAM file is unavailable. This example shows how to virtualize the program that maintains the missing VSAM file, eliminating the resource dependency.
The following graphic shows the CICS transaction (DEM3) that is running. The transaction runs from a 3270 terminal, but it could run from the CICS Transaction Gateway.
Running the transaction initiates DEMOAPP3, which performs a CICS LINK to DEMOINQ. DEMOINQ then runs the following CICS LINKs:
The following CICS regions are involved:
This example virtualizes DEMOGETB on CICSTS41. The example uses the DevTest agent, running in CICSA, communicating with the LPAR agent, communicating with the VSE server. We first run the CICS transaction to record the CICS LINK to DEMOGETB. We then use that recording to virtualize the CICS LINK.
The Virtual Service Image Recorder Basics tab contains the name of the service image (DEMOGETB.vsi), the VSM (DEMOGETB.vsm), and the transport protocol of CICS LINK.
The CICS Programs to Virtualize panel displays next. For detailed information about this panel, see Using the CICS Programs to Virtualize Panel.
Recording starts when the Next button is clicked. During recording, we run transaction DEM3 to invoke DEMOGETB with a CICS LINK.
As the following graphic shows, after it runs once, VSE records one transaction.
On the next panel, VSE adds the CICS Copybook data protocol to both the request and response sides.
The following graphic shows the copybook mapping XML file to use in this example. This file defines the mapping for DEMOGETB and it indicates to use DEMOGETB.txt as the copybook if a request for the program DEMOGETB exists.
As the following example shows, DEMOGETB.txt contains the COBOL copybook definition:
Copybooks/DEMOGETB.txt
05 DEMOGETB-COMMAREA.
10 DEMOGETB-RETURN PIC X. 10 DEMOGETB-MESSAGE PIC X(70). 10 BALANCE-REC. 15 BALANCE-ACCOUNT-NBR PIC X(8). 15 FILLER PIC X. 15 BALANCE-BALANCE PIC X(14). 15 FILLER PIC X. 15 BALANCE-AVERAGE PIC X(14).
On the next panel, the folder that has DEMOGETB.txt is specified, and the mapping XML. The codepage is changed to IBMO37.
Click Next. The copybook processes the data.
Click Next to stop processing and complete the service image recording.
When you open the VSI in the Service Image Editor, you can see that the copybook mapped the request data, then converted it to attributes. For example:
The copybook has also formatted the response. The following graphic shows the response to return when using virtualization:
Example
In this example, the VSAM file DEMOBAL is made unavailable, and program DEMO3 is run. DEMO3 fails because of the unavailability of DEMOBAL.
Next, the virtual service is deployed.
When the program DEMO3 is run again, it works, even though the VSAM file is still unavailable.
Copyright © 2014 CA Technologies.
All rights reserved.
|
|